#ifndef LIBMP4V2_INTERFACE_H
#define LIBMP4V2_INTERFACE_H

#include <QObject>
#include "mp4v2/mp4v2.h"
#include "include.h"
#include <QQueue>
#include <QTimer>


class libmp4v2_interface : public QObject
{
    Q_OBJECT
public:
    explicit libmp4v2_interface(QObject *parent = 0);
    ~libmp4v2_interface();
    void write_one_frame(uchar* bytes,uint size);
    void open_mp4_file(const char* pathname);
    QQueue<QByteArray> encoded_frame_queue;
signals:
    
public slots:
    void save_video_file();
private:
    MP4FileHandle mp4File;
    MP4TrackId videoTrackId;
    QTimer* refresh_timer;

};
#endif // LIBMP4V2_INTERFACE_H
